package flyweight;

public class Client {

    public static void main(String[] args) {

        WebSiteFactory factory = new WebSiteFactory();


        WebSite w1 = factory.getWebSite("微信");
        WebSite w2 = factory.getWebSite("新闻");
        WebSite w3 = factory.getWebSite("微信");

        w1.use(new User("小张"));
        w2.use(new User("小明"));
        w3.use(new User("小王"));

        System.out.println(factory.getWebSiteCount());




    }


}
